package org.hibernate.validator.xml;

import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;

@XmlRegistry
public class ObjectFactory {
    private static final QName _ValidationConfig_QNAME = new QName("http://jboss.org/xml/ns/javax/validation/configuration", "validation-config");
    private static final QName _ConstraintMappings_QNAME = new QName("http://jboss.org/xml/ns/javax/validation/mapping", "constraint-mappings");
    private static final QName _ElementTypeAnnotation_QNAME = new QName("http://jboss.org/xml/ns/javax/validation/mapping", "annotation");
    private static final QName _ElementTypeValue_QNAME = new QName("http://jboss.org/xml/ns/javax/validation/mapping", "value");

    public ObjectFactory() {
    }

    public ElementType createElementType() {
        return new ElementType();
    }

    public AnnotationType createAnnotationType() {
        return new AnnotationType();
    }

    public GetterType createGetterType() {
        return new GetterType();
    }

    public GroupsType createGroupsType() {
        return new GroupsType();
    }

    public BeanType createBeanType() {
        return new BeanType();
    }

    public FieldType createFieldType() {
        return new FieldType();
    }

    public PropertyType createPropertyType() {
        return new PropertyType();
    }

    public PayloadType createPayloadType() {
        return new PayloadType();
    }

    public ValidationConfigType createValidationConfigType() {
        return new ValidationConfigType();
    }

    public GroupSequenceType createGroupSequenceType() {
        return new GroupSequenceType();
    }

    public ValidatedByType createValidatedByType() {
        return new ValidatedByType();
    }

    public ConstraintDefinitionType createConstraintDefinitionType() {
        return new ConstraintDefinitionType();
    }

    public ConstraintType createConstraintType() {
        return new ConstraintType();
    }

    public ConstraintMappingsType createConstraintMappingsType() {
        return new ConstraintMappingsType();
    }

    public ClassType createClassType() {
        return new ClassType();
    }

    @XmlElementDecl(
            namespace = "http://jboss.org/xml/ns/javax/validation/configuration",
            name = "validation-config"
    )
    public JAXBElement<ValidationConfigType> createValidationConfig(ValidationConfigType value) {
        return new JAXBElement(_ValidationConfig_QNAME, ValidationConfigType.class, (Class)null, value);
    }

    @XmlElementDecl(
            namespace = "http://jboss.org/xml/ns/javax/validation/mapping",
            name = "constraint-mappings"
    )
    public JAXBElement<ConstraintMappingsType> createConstraintMappings(ConstraintMappingsType value) {
        return new JAXBElement(_ConstraintMappings_QNAME, ConstraintMappingsType.class, (Class)null, value);
    }

    @XmlElementDecl(
            namespace = "http://jboss.org/xml/ns/javax/validation/mapping",
            name = "annotation",
            scope = ElementType.class
    )
    public JAXBElement<AnnotationType> createElementTypeAnnotation(AnnotationType value) {
        return new JAXBElement(_ElementTypeAnnotation_QNAME, AnnotationType.class, ElementType.class, value);
    }

    @XmlElementDecl(
            namespace = "http://jboss.org/xml/ns/javax/validation/mapping",
            name = "value",
            scope = ElementType.class
    )
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
    public JAXBElement<String> createElementTypeValue(String value) {
        return new JAXBElement(_ElementTypeValue_QNAME, String.class, ElementType.class, value);
    }
}
